package com.zt.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zt.pojo.Order;

import java.util.List;

/**
* @author 洪
* @description 针对表【orders(订单表)】的数据库操作Service
* @createDate 2025-04-10 09:58:53
*/
public interface OrdersService extends IService<Order> {

    /**
     * 创建订单
     */
    Order createOrder(Integer userId, Integer courseId, Integer teacherId,
                      Integer couponId, Integer bookingId, String courseName);

    /**
     * 更新订单状态
     */
    boolean updateOrderStatus(String orderNo, Integer status);

    /**
     * 获取订单信息
     */
    Order getOrderByOrderNo(String orderNo);

    /**
     * 获取用户订单列表
     */
    List<Order> getUserOrders(Integer userId);
}
